package com.example.yuejian.yuejian.bean;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/10/9.
 */

public class Train {


    /**
     * id : 1
     * Trainname : 1
     * notice : 1
     * place : 沈阳
     * intro : 2013年度电站IT培训课程大纲
     一、 背景
     2013年度电站信息化进程将继续推进和深化，为使各业务部门相关人员更好地运用信息化工具，促进业务发展，为企业带来更高效益。电站IT部门特别开设IT相关课程，从网络安全、office操作、ERP介绍到结合业务管理的SAP各模块深入应用等方面入手，制定课程培训大纲，以便业务部门相关人员根据需要参加相应培训，为实现公司的发展目标提供高素质人才。
     * photo : http://10.0.2.2/laravel54/public/Uploads/2017-09-04-05-49-33-59ace96d1784c.jpg
     * phone : 1
     * type : 1
     * money : 123
     * time : 2015年5月7日 8：00-12：00
     * typename : 新手训练营
     */

    private int id;
    private String Trainname;
    private String notice;
    private String place;
    private String intro;
    private String photo;
    private String phone;
    private int type;
    private String money;
    private String time;
    private String typename;

    public static Train objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), Train.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setTrainname(String Trainname) {
        this.Trainname = Trainname;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setType(int type) {
        this.type = type;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public void setTypename(String typename) {
        this.typename = typename;
    }

    public int getId() {
        return id;
    }

    public String getTrainname() {
        return Trainname;
    }

    public String getNotice() {
        return notice;
    }

    public String getPlace() {
        return place;
    }

    public String getIntro() {
        return intro;
    }

    public String getPhoto() {
        return photo;
    }

    public String getPhone() {
        return phone;
    }

    public int getType() {
        return type;
    }

    public String getMoney() {
        return money;
    }

    public String getTime() {
        return time;
    }

    public String getTypename() {
        return typename;
    }
}
